package com.xjm.viewservice.service;

import com.xjm.viewservice.config.HystrixConfig;
import com.xjm.viewservice.entity.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import java.util.List;

/**
 * @author Panda
 * @create 2022-01-13 11:57
 */

@FeignClient(value = "DATA-SERVICE",fallback = HystrixConfig.class)
public interface ProductServiceFeign {

    /**
     * 通过 feign 方式
     * @return
     */
    @GetMapping("/products")
    public List<Product> listProdcuts();

}
